import { lazy } from "react";

export const homeRouter = [
  {
    path: "/home/index",
    element: lazy(() => import("../page/home/Index.jsx")),
    title: "精选推荐",
  },
  {
    path: "/home/work",
    element: lazy(() => import("../page/home/Work.jsx")),
    title: "工作台",
  },
];

const route = [
  {
    path: "/",
    to: "/home",
  },
  {
    path:'/home',
    element: lazy(() => import('../page/Home.jsx')),
    children:homeRouter
  },
  {
    path: "/login",
    element: lazy(() => import("../page/login.jsx")),
  },
  {
    path: "*",
    element: lazy(() => import("../page/Error.jsx")),
  },
];

export default route;
